package de.kardass.jannobatch.examples.simple.third;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import de.kardass.jannobatch.ItemReader;

public class ThirdReader implements ItemReader<ThirdA> {

	private final List<ThirdA> list;

	
	public ThirdReader() {
		super();
		list = new ArrayList<ThirdA>();
		list.add(new ThirdA("Leni"));
		list.add(new ThirdA("Annique"));
		list.add(new ThirdA("Manfred"));
	}

	@Override
	public void onShutDown() {
		System.out.println("     " + getClass() + "-> finish");
	}

	@Override
	public void onStartUp() {
		System.out.println("     " + getClass() + "-> init");
		
	}

	@Override
	public Iterator<ThirdA> iterator() {
		return list.iterator();
	}

}
